package cn.bgs.pojo;


import cn.bgs.utils.DateUtils;

import java.util.Date;

public class exam {
    @Override
    public String toString() {
        return "exam{" +
                "age=" + age +
                ", pkId=" + pkId +
                ", name='" + name + '\'' +
                ", sex='" + sex + '\'' +
                ", birthday=" + birthday +
                ", deleteFlag='" + deleteFlag + '\'' +
                ", createTime=" + createTime +
                ", updateTime=" + updateTime +
                '}';
    }

    private Integer age;

    public Integer getAge() {
        int age=0;
        try {
            age = DateUtils.getAge(birthday);
        } catch (Exception e) {
            // TODO Auto-generated catch block
            e.printStackTrace();
        }
        return age;
    }

    public void setAge(Integer age) {
        this.age = age;
    }

    /**
     *
     * This field was generated by MyBatis Generator.
     * This field corresponds to the database column exam.pk_id
     *
     * @mbg.generated Mon Sep 06 08:24:57 CST 2021
     */
    private Integer pkId;

    /**
     *
     * This field was generated by MyBatis Generator.
     * This field corresponds to the database column exam.name
     *
     * @mbg.generated Mon Sep 06 08:24:57 CST 2021
     */
    private String name;

    /**
     *
     * This field was generated by MyBatis Generator.
     * This field corresponds to the database column exam.sex
     *
     * @mbg.generated Mon Sep 06 08:24:57 CST 2021
     */
    private String sex;

    /**
     *
     * This field was generated by MyBatis Generator.
     * This field corresponds to the database column exam.birthday
     *
     * @mbg.generated Mon Sep 06 08:24:57 CST 2021
     */
    private Date birthday;

    /**
     *
     * This field was generated by MyBatis Generator.
     * This field corresponds to the database column exam.delete_flag
     *
     * @mbg.generated Mon Sep 06 08:24:57 CST 2021
     */
    private String deleteFlag;

    /**
     *
     * This field was generated by MyBatis Generator.
     * This field corresponds to the database column exam.create_time
     *
     * @mbg.generated Mon Sep 06 08:24:57 CST 2021
     */
    private Date createTime;

    /**
     *
     * This field was generated by MyBatis Generator.
     * This field corresponds to the database column exam.update_time
     *
     * @mbg.generated Mon Sep 06 08:24:57 CST 2021
     */
    private Date updateTime;

    /**
     * This method was generated by MyBatis Generator.
     * This method returns the value of the database column exam.pk_id
     *
     * @return the value of exam.pk_id
     *
     * @mbg.generated Mon Sep 06 08:24:57 CST 2021
     */
    public Integer getPkId() {
        return pkId;
    }

    /**
     * This method was generated by MyBatis Generator.
     * This method sets the value of the database column exam.pk_id
     *
     * @param pkId the value for exam.pk_id
     *
     * @mbg.generated Mon Sep 06 08:24:57 CST 2021
     */
    public void setPkId(Integer pkId) {
        this.pkId = pkId;
    }

    /**
     * This method was generated by MyBatis Generator.
     * This method returns the value of the database column exam.name
     *
     * @return the value of exam.name
     *
     * @mbg.generated Mon Sep 06 08:24:57 CST 2021
     */
    public String getName() {
        return name;
    }

    /**
     * This method was generated by MyBatis Generator.
     * This method sets the value of the database column exam.name
     *
     * @param name the value for exam.name
     *
     * @mbg.generated Mon Sep 06 08:24:57 CST 2021
     */
    public void setName(String name) {
        this.name = name == null ? null : name.trim();
    }

    /**
     * This method was generated by MyBatis Generator.
     * This method returns the value of the database column exam.sex
     *
     * @return the value of exam.sex
     *
     * @mbg.generated Mon Sep 06 08:24:57 CST 2021
     */
    public String getSex() {
        return sex;
    }

    /**
     * This method was generated by MyBatis Generator.
     * This method sets the value of the database column exam.sex
     *
     * @param sex the value for exam.sex
     *
     * @mbg.generated Mon Sep 06 08:24:57 CST 2021
     */
    public void setSex(String sex) {
        this.sex = sex == null ? null : sex.trim();
    }

    /**
     * This method was generated by MyBatis Generator.
     * This method returns the value of the database column exam.birthday
     *
     * @return the value of exam.birthday
     *
     * @mbg.generated Mon Sep 06 08:24:57 CST 2021
     */
    public Date getBirthday() {
        return birthday;
    }

    /**
     * This method was generated by MyBatis Generator.
     * This method sets the value of the database column exam.birthday
     *
     * @param birthday the value for exam.birthday
     *
     * @mbg.generated Mon Sep 06 08:24:57 CST 2021
     */
    public void setBirthday(Date birthday) {
        this.birthday = birthday;
    }

    /**
     * This method was generated by MyBatis Generator.
     * This method returns the value of the database column exam.delete_flag
     *
     * @return the value of exam.delete_flag
     *
     * @mbg.generated Mon Sep 06 08:24:57 CST 2021
     */
    public String getDeleteFlag() {
        return deleteFlag;
    }

    /**
     * This method was generated by MyBatis Generator.
     * This method sets the value of the database column exam.delete_flag
     *
     * @param deleteFlag the value for exam.delete_flag
     *
     * @mbg.generated Mon Sep 06 08:24:57 CST 2021
     */
    public void setDeleteFlag(String deleteFlag) {
        this.deleteFlag = deleteFlag == null ? null : deleteFlag.trim();
    }

    /**
     * This method was generated by MyBatis Generator.
     * This method returns the value of the database column exam.create_time
     *
     * @return the value of exam.create_time
     *
     * @mbg.generated Mon Sep 06 08:24:57 CST 2021
     */
    public Date getCreateTime() {
        return createTime;
    }

    /**
     * This method was generated by MyBatis Generator.
     * This method sets the value of the database column exam.create_time
     *
     * @param createTime the value for exam.create_time
     *
     * @mbg.generated Mon Sep 06 08:24:57 CST 2021
     */
    public void setCreateTime(Date createTime) {
        this.createTime = createTime;
    }

    /**
     * This method was generated by MyBatis Generator.
     * This method returns the value of the database column exam.update_time
     *
     * @return the value of exam.update_time
     *
     * @mbg.generated Mon Sep 06 08:24:57 CST 2021
     */
    public Date getUpdateTime() {
        return updateTime;
    }

    /**
     * This method was generated by MyBatis Generator.
     * This method sets the value of the database column exam.update_time
     *
     * @param updateTime the value for exam.update_time
     *
     * @mbg.generated Mon Sep 06 08:24:57 CST 2021
     */
    public void setUpdateTime(Date updateTime) {
        this.updateTime = updateTime;
    }
}